package com.glsc.ngateway.common.base.domain.sqlserver.glsec;

import javax.persistence.*;
import java.util.Objects;

/**
 * @Auther: gaojc
 * @Date: 2021/9/22 18:24
 * @Description:
 */
@Entity
@Table(name = "eVW_DeptInfo")
public class TAmEhrDeptinfoEntity {
    private int depid;
    private Integer adminid;
    private String atitle;
    private String depgrade;
    private String dtitle;
    private String comptitle;
    private String leader;
    private String lname;
    private TAmEhrDeptinfoEntity parentDepartment;

    @Id
    @Column(name = "depid", nullable = false)
    public int getDepid() {
        return depid;
    }

    public void setDepid(int depid) {
        this.depid = depid;
    }

    @Basic
    @Column(name = "adminid", nullable = true)
    public Integer getAdminid() {
        return adminid;
    }

    public void setAdminid(Integer adminid) {
        this.adminid = adminid;
    }

    @Basic
    @Column(name = "atitle", nullable = true, length = 100)
    public String getAtitle() {
        return atitle;
    }

    public void setAtitle(String atitle) {
        this.atitle = atitle;
    }

    @Basic
    @Column(name = "comptitle", nullable = true, length = 100)
    public String getComptitle() {
        return comptitle;
    }

    public void setComptitle(String comptitle) {
        this.comptitle = comptitle;
    }

    @Basic
    @Column(name = "depgrade", nullable = true, length = 100)
    public String getDepgrade() {
        return depgrade;
    }

    public void setDepgrade(String depgrade) {
        this.depgrade = depgrade;
    }

    @Basic
    @Column(name = "dtitle", nullable = true, length = 100)
    public String getDtitle() {
        return dtitle;
    }

    public void setDtitle(String dtitle) {
        this.dtitle = dtitle;
    }

    @Basic
    @Column(name = "leader", nullable = true, length = 100)
    public String getLeader() {
        return leader;
    }

    public void setLeader(String leader) {
        this.leader = leader;
    }

    @Basic
    @Column(name = "lname", nullable = true, length = 200)
    public String getLname() {
        return lname;
    }

    public void setLname(String lname) {
        this.lname = lname;
    }

    @Transient
    public TAmEhrDeptinfoEntity getParentDepartment() {
        return parentDepartment;
    }

    public void setParentDepartment(TAmEhrDeptinfoEntity parentDepartment) {
        this.parentDepartment = parentDepartment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TAmEhrDeptinfoEntity that = (TAmEhrDeptinfoEntity) o;
        return depid == that.depid && Objects.equals(adminid, that.adminid) && Objects.equals(atitle, that.atitle) && Objects.equals(depgrade, that.depgrade) && Objects.equals(dtitle, that.dtitle) && Objects.equals(leader, that.leader) && Objects.equals(lname, that.lname);
    }

    @Override
    public int hashCode() {
        return Objects.hash(depid, adminid, atitle, depgrade, dtitle, leader, lname);
    }


    @Override
    public String toString() {
        return "TAmEhrDeptinfoEntity{" +
                "depid=" + depid +
                ", adminid=" + adminid +
                ", atitle='" + atitle + '\'' +
                ", depgrade='" + depgrade + '\'' +
                ", dtitle='" + dtitle + '\'' +
                ", comptitle='" + comptitle + '\'' +
                ", leader='" + leader + '\'' +
                ", lname='" + lname + '\'' +
                ", parentDepartment=" + parentDepartment +
                '}';
    }
}
